package com.basic.business.order.domain;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 订单明细表 t_orders_detail
 *
 * @author zhaoxy_jn@163.com
 */
@Getter
@Setter
public class TOrdersDetail implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 子订单系统编号 */
    private long id;

    /** 子系统订单号 */
    @JSONField(name = "sid")
    private long detailSid;

    /** 主系统订单号 */
    @JSONField(deserialize = false)
    private long mainSid;

    /** 平台商品数字编号 */
    private String numIid;

    /** 平台订单号 */
    private String tid;

    /** 商品名称 */
    private String title;

    /** 订单数量 */
    private Integer num;

    /** 平台商品图片链接 */
    private String picPath;

    /** 订单SK 存放自定义备注信息 */
    private String outerSkuId = "";

    /** 系统SKU的规格属性名称 */
    private String sysSkuPropertiesName;

    /** 订单状态 */
    private String sysStatus;

    /** 是否赠品 Y是 N否*/
    @JSONField(deserialize = false)
    private String isGift;

    /** 平台ID(SKUID)*/
    private String skuId;

    /** 成交金额 */
    private double payAmount;

    /** 下单时间 */
    private long created;

    /** 付款时间 */
    private long payTime;

    /** 数据更新时间 */
    private long updTime;

    /** 数据接入时间 */
    @JSONField(deserialize = false)
    private long accessTime;

    public TOrdersDetail() {
        this.accessTime = System.currentTimeMillis();
    }

    @Override
    public String toString() {
        return "TOrdersDetail{" +
                "id=" + id +
                ", detailSid=" + detailSid +
                ", mainSid=" + mainSid +
                ", numIid='" + numIid + '\'' +
                ", tid='" + tid + '\'' +
                ", title='" + title + '\'' +
                ", num=" + num +
                ", picPath='" + picPath + '\'' +
                ", outerSkuId='" + outerSkuId + '\'' +
                ", sysSkuPropertiesName='" + sysSkuPropertiesName + '\'' +
                ", sysStatus='" + sysStatus + '\'' +
                ", isGift='" + isGift + '\'' +
                ", skuId='" + skuId + '\'' +
                ", payAmount=" + payAmount +
                ", created=" + created +
                ", payTime=" + payTime +
                ", updTime=" + updTime +
                ", accessTime=" + accessTime +
                '}';
    }
}
